export default {
  showToast (options, icon) {
    let obj = {
      title: '提示',
      mask: false,
      icon: 'none',
      duration: 2000
    }
    if (typeof options === 'string') {
      obj.title = options
    } else {
      obj = {
        ...obj,
        ...options
      }
    }
    if (icon) {
      obj.icon = icon
    }
    wx.showToast(obj)
  }
}
